package prototype.persistence.hibernate;

import java.util.List;
import java.sql.Timestamp;

import prototype.persistence.pojo.Map;
import prototype.persistence.MapDAO;

import org.hibernate.criterion.Restrictions;

/**
 * <p>Hibernate DAO layer for Maps</p>
 * <p>Generated at Sun Jan 03 13:49:53 EET 2010</p>
 *
 * @author Salto-db Generator v1.0.16 / Pojos + Hibernate mapping + Generic DAO
 * @see http://www.hibernate.org/328.html
 */
public class MapHibernateDAO extends
		AbstractHibernateDAO<Map, Integer> implements
		MapDAO {

	/**
	 * Find Map by name
	 */
	public List<Map> findByName(String name) {
		return findByCriteria(Restrictions.eq("name", name));
	}
	
	/**
	 * Find Map by type
	 */
	public List<Map> findByType(Integer type) {
		return findByCriteria(Restrictions.eq("type", type));
	}
	
	/**
	 * Find Map by filePath
	 */
	public List<Map> findByFilePath(String filePath) {
		return findByCriteria(Restrictions.eq("filePath", filePath));
	}
	
	/**
	 * Find Map by scale
	 */
	public List<Map> findByScale(Integer scale) {
		return findByCriteria(Restrictions.eq("scale", scale));
	}
	

}
